<html>
<head><meta charset="utf-8"><title>capture clause RFC · t-compiler/wg-rfc-2229 · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/index.html">t-compiler/wg-rfc-2229</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/capture.20clause.20RFC.html">capture clause RFC</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="230078444"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/capture%20clause%20RFC/near/230078444" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/capture.20clause.20RFC.html#230078444">(Mar 12 2021 at 18:44)</a>:</h4>
<p>So I was thinking about capture clauses and I wound up writing a whole RFC draft:</p>
<p><a href="https://hackmd.io/38jKhUkvSC2pkG1BrI3boQ?edit">https://hackmd.io/38jKhUkvSC2pkG1BrI3boQ?edit</a></p>
<p><span class="user-group-mention" data-user-group-id="1175">@WG-rfc-2229</span> <span aria-label="point up" class="emoji emoji-1f446" role="img" title="point up">:point_up:</span></p>



<a name="230078452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/capture%20clause%20RFC/near/230078452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/capture.20clause.20RFC.html#230078452">(Mar 12 2021 at 18:44)</a>:</h4>
<p>I'm kind of psyched about this</p>



<a name="230078486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/capture%20clause%20RFC/near/230078486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/capture.20clause.20RFC.html#230078486">(Mar 12 2021 at 18:45)</a>:</h4>
<p>I don't think it would be too hard to implement, but it's also maybe a bit out of the scope you signed up for :)</p>



<a name="230085500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/capture%20clause%20RFC/near/230085500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/capture.20clause.20RFC.html#230085500">(Mar 12 2021 at 19:37)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span>  thank you for writting this up, we'll take a look over the weekend and I'll let you know how our discussion goes</p>



<a name="230150683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/capture%20clause%20RFC/near/230150683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/capture.20clause.20RFC.html#230150683">(Mar 13 2021 at 09:24)</a>:</h4>
<p>Implementation wise, I think we only need a small subset for the purposes of RFC 2229, and we could start there</p>



<a name="230191163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/capture%20clause%20RFC/near/230191163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/capture.20clause.20RFC.html#230191163">(Mar 13 2021 at 21:51)</a>:</h4>
<p>Implementation wise, I feel we can get away without even needing a desugaring</p>



<a name="230191212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/capture%20clause%20RFC/near/230191212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/capture.20clause.20RFC.html#230191212">(Mar 13 2021 at 21:52)</a>:</h4>
<p>We can just deal with them the same way we deal with old style capture analysis i.e. force capture</p>



<a name="230191231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/capture%20clause%20RFC/near/230191231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/capture.20clause.20RFC.html#230191231">(Mar 13 2021 at 21:52)</a>:</h4>
<p>I read the RFC a bit, and left some comments, I plan on doing a better review tonight</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>